from Base import Base
from selenium.webdriver.common.by import By

# 登录
class Page01(Base):

    usernameSR_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[2]/div[1]/div/div/input')

    passwordSR_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[2]/div[2]/div/div/input')

    loginDJ_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div/div[3]/button')

    dy1_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/form/div/div[1]/div/label')

    def usernameSR(self):
        self.send_keys(self.usernameSR_loc,'liyou01')

    def passwordSR(self):
        self.send_keys(self.passwordSR_loc,'1234561')

    def loginDJ(self):
        self.click(self.loginDJ_loc)

    def dy1(self):
        return self.find_element(self.dy1_loc).text
